package io.seata.order.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import io.seata.order.config.CustomLocalDateTimeTypeHandler;
import io.seata.order.config.MyLocalDateTimeTypeHandler;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@TableName(value = "order_info", autoResultMap = true)
public class Order {

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private String orderName;

    private Long productId;

    private Integer buyNum;

    @TableField(value = "create_time",typeHandler = CustomLocalDateTimeTypeHandler.class)
    private LocalDateTime createTime;

    @TableField(value = "update_time",typeHandler = CustomLocalDateTimeTypeHandler.class)
    private LocalDateTime updateTime;

}
